package router

import (
	"github.com/gin-gonic/gin"
	"mobile-phone/internal/api"
	"mobile-phone/pkg"
)

func UserRouter(c *gin.RouterGroup) {
	user := c.Group("/user")
	{
		user.POST("/register", api.Register)
		user.POST("/login", api.Login)
		user.Use(pkg.JWTAuth("2209A"))
		user.POST("/ws", api.Ws)
		user.GET("/list", api.List)
		user.POST("/friend", api.Friend)
	}
}
